﻿namespace StringContainCountService
{
    public class StringContainCountService : IStringContainCountService
    {
        public int CountOfStringInString(string smallString, string Container)
        {
            int startIndex = 0;
            int counter = 0;
            while (startIndex != -1)
            {
                startIndex = Container.IndexOf(smallString, startIndex+1);
                counter++;
            }
            return counter;
        }
    }
}
